<template>
	<view class="executeResult">
		<uni-nav-bar color="#ffffff" background-color="#00aded" :statusBar="true" title="签到实绩" fixed="true" left-icon="left" left-text="返回" @clickLeft="back"></uni-nav-bar>
		<view class="executeResult_top">
			<!-- 搜索 -->
			<dil-search :columnData="options.columnDataList" @onSearch="onSearch" v-if="options.columnDataList.length > 0"></dil-search>
		</view>
		<view class="executeResult_main">
			<dil-card class="dilCard" @emitEvent="emitEvent" v-bind.sync="options"></dil-card>
		</view>
		<view class="executeResult_floot"></view>
	</view>
</template>

<script>
import { mapState, mapMutations } from 'vuex';
export default {
	data() {
		return {
			options: {
				requestUrl: '/api/v1/tms/getSignInResultList?apiId=607',
				requestQuery: {},
				cardSlotList: [],
				columnDataList: [],
				totalNum: 0,
				rowDataList: []
			}
		};
	},
	onShow() {
		uni.$emit('onShow', 1);

		this.getOrderSection();
	},
	mounted() {
		this.getOrderSectionDebounce = this.Tool.debounce((data) => {
			this.getOrderSection(data);
		}, 1500);
	},
	methods: {
		onSearch(item) {
			this.getOrderSectionDebounce(item);
		},
		back() {
			uni.navigateBack({
				url: '/pages/index/index'
			});
		},
		async getOrderSection(data = {}) {
			this.options.requestQuery = { ...data };
		},
		emitEvent(eventName, cardItem) {
			this[eventName](cardItem);
		}
		//vuex
	}
};
</script>

<style lang="scss" scoped>
.executeResult {
	width: 100vw;
	height: 100%;
	background-color: #f5f5f5;
	&_top {
		background-color: #fff;
	}
	&_main {
		margin-top: 20rpx;
		padding-bottom: 20rpx;
		background-color: #fff;
	}
	&_floot {
	}
}
</style>
